1. Field of the Invention
The present invention relates to an image sensing apparatus such as a digital camera, and more particularly to an image sensing apparatus having a dynamic range compression function, and an image processing method adapted to the image sensing apparatus.
2. Description of the Related Art
In recent years, image sensing apparatuses such as digital cameras have a challenging task of providing an image sensor capable of enlarging a luminance range i.e. a dynamic range of a subject image to meet a demand for high-quality image reproduction. Concerning a technique on the dynamic range enlargement, there is known an image sensor having an output characteristic that an electrical signal in a high luminance area is logarithmically converted commensurate with the amount of incident light by utilizing, for instance, a subthreshold characteristic of a MOSFET, in other words, an image sensor (hereinafter also called as “linear-logarithmic sensor”) having a photoelectric conversion characteristic comprising a linear characteristic area and a logarithmic characteristic area. As mentioned above, the linear-logarithmic sensor has the output characteristic that an electrical signal is natural logarithmically converted commensurate with the amount of incident light. Accordingly, the linear-logarithmic sensor enables to secure a wider dynamic range than an image sensor having a photoelectric conversion characteristic solely in a linear characteristic area.
Whereas a sensing device such as the linear-logarithmic sensor has succeeded in securing a wide dynamic range, a display device such as a monitor has not succeeded in securing a wide dynamic range, as compared with the sensing device. Even if a wide dynamic range is obtained for an input image, the effect of the wide dynamic range cannot be satisfactorily exhibited on the display device. In view of this, it is necessary to compress a dynamic range of the input image so as to display the input image having the wider dynamic range within the dynamic range of the display device.
“To compress a dynamic range” has two meanings: one is to locally adjust the contrast of an image, specifically, to increase the contrast i.e. the gradation by compressing an illumination component of an image; and the other is to literally compress the dynamic range while maintaining the contrast distribution on the entire image, in other words, to uniformly compress the entire image without local adjustment of the contrast. Hereinafter, the former technique is called as “dodging or dodging processing”, and the latter technique is called as “dynamic range compression” to distinguish one from the other. As will be described later, it is technically proper to conclude that the illumination component is substantially a low-frequency component, and a reflectance component to be described later is a high-frequency component.
Conventionally, the dodging is performed by: extracting an illumination component out of an image, while, at the same time, extracting a reflectance component; compressing a dynamic range of the illumination component; and generating a new image where the contrast of the image is locally adjusted, based on the illumination component after the dynamic range compression, and the reflectance component. Japanese Patent Application No. 2004-377875 (D1) discloses an example of the technique concerning the dodging. As shown in FIG. 16, the technique comprises: dividing an image (hereinafter, called as “linear-logarithmic image”, which corresponds to an original image “I” to be described later) having a photoelectric conversion characteristic comprising a linear characteristic area and a logarithmic characteristic area, which is obtained by a linear-logarithmic sensor, into a logarithmic image “I1” and a linear image “I2” for extraction; dodging the respective images; and synthesizing the dodged images. In the technology, an image synthesizer is provided to prevent degradation of an S/N ratio. Specifically, as shown in FIG. 17, in the case where the pixel value of an image “I′” obtained by the synthesis of the logarithmic image and the linear image after the dodging is larger than the pixel value of the original image “I”, namely, image I′>image I, the image synthesizer is operative to select the original image “I” indicated by 902 instead of the image “I′” indicated by 901.
Also, Japanese Patent No. 2509503 (D2) discloses a technique comprising: classifying image signals into a large-value group and a small-value group, using a reference value; and performing dynamic range compression for the respective groups with use of different correction data for dynamic range compression so as to keep the contrast of a portion of the image having an initially sufficient contrast from unduly lowering by image compression.
In the technology disclosed in D1, however, the compression ratio is set in accordance with the dynamic range of an input image. Accordingly, there is likelihood that an illumination component of a main subject image i.e. a main subject luminance may be compressed, which leads, for example, to gradation non-uniformity on a human face image, which is a generally important part of a photo, e.g. appearance of a so-called “whiteout”, an overexposed appearance of a face image, which normally appears bright. Specifically, as shown in FIG. 18, if a main subject luminance lies within the luminance range indicated by 911, the contrast may be unduly lowered by the dynamic range compression. The drawback may be avoided by using the technique shown in D2, namely, by keeping an area indicated by 921 in FIG. 19, which is a portion of the original image having a pixel value smaller than a predetermined value θ from dodging. If, however, dodging is performed for a reflectance component in an area indicated by 922 where the pixel value is equal to or larger than the predetermined value θ, as mentioned above, there occurs a drawback that image I′>image I, which may degrade the S/N ratio. In other words, unduly increase of brightness on a dark image area may increase a noise component, which may resultantly degrade the image quality. Also, in the technology of D1, after the dodging of the entire image, the image “I′” and the image “I” are compared, which requires an extended processing time. Generally, most of the processing time required in dodging is spent for extraction of an illumination component, using an edge keeping filter such as a median filter or an epsilon filter.